﻿<UserControl x:Class="SLWebApp.ShipSchedule"
    xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" 
    xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit" 
    xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d" d:DesignHeight="470" d:DesignWidth="1184" FontFamily="Verdana" FontSize="12">
    <toolkit:BusyIndicator x:Name="progressbar_ShipSchedule" IsBusy="False" >
        <Grid x:Name="LayoutRoot" Background="White">
            <StackPanel>
                <StackPanel  Grid.Row="0" >
                    <!-- 船期工具栏-->
                    <Border Height="10"></Border>
                    <Border BorderThickness="1" Height="30" BorderBrush="#b4b4b4" CornerRadius="1" >
                        <Border.Background>
                            <ImageBrush ImageSource="/SLWebApp;component/img/operate_box_bg.png" />
                        </Border.Background>
                        <StackPanel  Orientation="Horizontal" HorizontalAlignment="Left" >
                            <TextBlock Text="操作：" Padding="10,6" Height="30" Width="50"/>
                            <Image Width="16" Height="16" Source="/SLWebApp;component/img/icon_add.png"></Image>
                            <TextBlock  x:Name="btnAdd_VesselSchedule" MouseLeftButtonDown="btnAdd_VesselSchedule_MouseLeftButtonDown" Padding="3,6" Cursor="Hand">增加</TextBlock>
                            <TextBlock Padding="3,5">|</TextBlock>
                            <Image Width="16" Height="16" Source="/SLWebApp;component/img/icon_delete.png"></Image>
                            <TextBlock x:Name="btnDel_VesselSchedule" MouseLeftButtonDown="btnDel_VesselSchedule_MouseLeftButtonDown" Padding="3,6" Cursor="Hand">删除</TextBlock>
                            <TextBlock Padding="3,5">|</TextBlock>
                            <Image Width="16" Height="16" Source="/SLWebApp;component/img/Icon-Search.png"></Image>
                            <TextBlock x:Name="btnModefy_Schedule" MouseLeftButtonDown="btnModefy_Schedule_MouseLeftButtonDown" Padding="3,6" Cursor="Hand">修改</TextBlock>
                            <TextBlock Padding="3,5">|</TextBlock>
                            <Image Width="16" Height="16" Source="/SLWebApp;component/img/Icon-Search.png"></Image>
                            <TextBlock Padding="3,6"   x:Name="btnSearch" MouseLeftButtonDown="btnSearch_MouseLeftButtonDown"  Cursor="Hand">查询</TextBlock>
                        </StackPanel>
                    </Border>
                    <Border BorderThickness="0" Height="5" >
                    </Border>
                    <Border BorderThickness="1" Height="70" BorderBrush="#b4b4b4" CornerRadius="1" >
                        <Border.Background>
                            <ImageBrush ImageSource="/SLWebApp;component/img/operate_box_bg.png" />
                        </Border.Background>
                        <Grid Height="60">
                            <Grid.RowDefinitions>
                                <RowDefinition  Height="30" />
                                <RowDefinition Height="30" />
                            </Grid.RowDefinitions>
                            <StackPanel Grid.Row="0"  Orientation="Horizontal" HorizontalAlignment="Left" >
                                <TextBlock Text="英文船名：" Padding="10,5" Height="22"/>
                                <sdk:AutoCompleteBox x:Name="autoComENName" Height="22" Width="205" SelectionChanged="autoComENName_SelectionChanged" IsDropDownOpen="True" IsTextCompletionEnabled="True" TabNavigation="Cycle" />

                                <TextBlock Padding="3,5" Height="22" Margin="30,0,0,0">中文船名：</TextBlock>
                                <TextBox x:Name="txtVesselCNName" MinWidth="205" Width="50" Height="22"></TextBox>


                                <TextBlock Padding="3,5" Height="22" Margin="30,0,0,0">进口航次：</TextBlock>
                                <TextBox x:Name="txtInVoyage" Width="50" Height="22"></TextBox>

                                <TextBlock Padding="3,6" Cursor="Hand" Height="22" Margin="30,0,0,0">出口航次：</TextBlock>
                                <TextBox x:Name="txtExVoyage" Width="50" Height="22"></TextBox>

                            </StackPanel>
                            <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Left">
                                <TextBlock Padding="10,6" Height="22">抵港时间：</TextBlock>
                                <sdk:DatePicker x:Name="dateETA_start" Height="22" />
                                <TextBlock Padding="3,6" >-</TextBlock>
                                <sdk:DatePicker x:Name="dateETA_end" Height="22"/>

                                <TextBlock Padding="3,6" Height="22" Margin="30,0,0,0">离港时间：</TextBlock>
                                <sdk:DatePicker x:Name="dateETD_start" Height="22" />
                                <TextBlock Padding="3,6">-</TextBlock>
                                <sdk:DatePicker x:Name="dateETD_end" Height="22"/>

                                <TextBlock Padding="3,6" Height="22" Margin="30,0,0,0">预靠码头：</TextBlock>
                                <ComboBox x:Name="txtTerminal" MinWidth="50" Height="22">
                                    <ComboBox.ItemTemplate>
                                        <DataTemplate>
                                            <TextBlock Text="{Binding Path=CST_CSTM}" Width="Auto"></TextBlock>
                                        </DataTemplate>
                                    </ComboBox.ItemTemplate>
                                </ComboBox>
                            </StackPanel>
                        </Grid>
                    </Border>
                    <Border BorderThickness="0" Height="5" >
                    </Border>
                    <!--表格内容-->

                    <sdk:DataGrid x:Name="dataGridVesselSchedule" SelectionMode="Single" SelectionChanged="dataGridVesselSchedule_SelectionChanged" 
                          Height="Auto" MaxHeight="170" IsReadOnly="True" AutoGenerateColumns="False" HorizontalContentAlignment="Center" >
                        <sdk:DataGrid.Columns>
                            <sdk:DataGridTextColumn Header="英文船名" Binding="{Binding VSL_ENNAME}" Width="10*"  />
                            <sdk:DataGridTextColumn Header="中文船名" Binding="{Binding VSL_CNNAME}" Width="10*"/>
                            <sdk:DataGridTextColumn Header="进口航次" Binding="{Binding SCD_IVOYAGE}" Width="8*" />
                            <sdk:DataGridTextColumn Header="出口航次" Binding="{Binding SCD_EVOYAGE}" Width="8*" />
                            <sdk:DataGridTextColumn Header="进出口航线" Binding="{Binding SERVICELINE}" Width="Auto" />
                            <sdk:DataGridTextColumn Header="抵港时间" Binding="{Binding SCD_ETA, StringFormat='MM-dd HH:mm'}" Width="12*"/>
                            <sdk:DataGridTextColumn Header="离港时间" Binding="{Binding SCD_ETD,StringFormat='MM-dd HH:mm'}" Width="12*" />
                            <sdk:DataGridTextColumn Header="预靠码头" Binding="{Binding CST_CSTM}" Width="10*" />
                            <sdk:DataGridTextColumn Header="状态" Binding="{Binding SCD_STATUS}" Width="6*" />
                            <sdk:DataGridTextColumn Header="预报位置" Binding="{Binding RV_MEANING}" Width="10*" />
                            <sdk:DataGridTextColumn Header="引航标志" Binding="{Binding SCD_PILOTAGE}" Width="10*" />
                            <sdk:DataGridTextColumn Header="上一港" Binding="{Binding POT_FNAME}" Width="10*" />
                            <sdk:DataGridTextColumn Header="下一港" Binding="{Binding POT_NNAME}" Width="10*" />
                        </sdk:DataGrid.Columns>
                    </sdk:DataGrid>
                </StackPanel>

                <!--下面的页面-->

                <sdk:TabControl  Grid.Row="1" Height="150" Margin="0,10,0,0">
                    <sdk:TabItem Header="靠泊">
                        <StackPanel>
                            <Border BorderThickness="1" Height="30" BorderBrush="#b4b4b4" CornerRadius="1" >
                                <Border.Background>
                                    <ImageBrush ImageSource="/SLWebApp;component/img/operate_box_bg.png" />
                                </Border.Background>
                                <StackPanel  Orientation="Horizontal" HorizontalAlignment="Left" >
                                    <TextBlock Text="操作：" Padding="10,6" Height="30" Width="50"/>
                                    <Image Width="16" Height="16" Source="/SLWebApp;component/img/icon_add.png"></Image>
                                    <TextBlock x:Name="btnVesselBerthe_Add" MouseLeftButtonDown="btnVesselBerthe_Add_MouseLeftButtonDown" Padding="3,6" Cursor="Hand">增加</TextBlock>
                                    <TextBlock Padding="3,5">|</TextBlock>
                                    <Image Width="16" Height="16" Source="/SLWebApp;component/img/icon_delete.png"></Image>
                                    <TextBlock x:Name="btnVessBerthe_Del" MouseLeftButtonDown="btnVessBerthe_Del_MouseLeftButtonDown" Padding="3,6" Cursor="Hand">删除</TextBlock>
                                    <TextBlock Padding="3,5">|</TextBlock>
                                    <Image Width="16" Height="16" Source="/SLWebApp;component/img/Icon-Search.png"></Image>
                                    <TextBlock x:Name="btnVessBerthe_Modefy" MouseLeftButtonDown="btnVessBerthe_Modefy_MouseLeftButtonDown" Padding="3,6" Cursor="Hand">修改</TextBlock>
                                    <TextBlock Padding="3,5">|</TextBlock>
                                </StackPanel>
                            </Border>

                            <Border BorderThickness="0" Height="5">
                            </Border>
                            <!-- 靠泊表格内容-->

                            <sdk:DataGrid x:Name="dataGridVesselBerthes" Height="Auto" MaxHeight="80" IsReadOnly="True"  AutoGenerateColumns="False" HorizontalContentAlignment="Center">
                                <sdk:DataGrid.Columns>
                                    <sdk:DataGridTextColumn Header="预靠码头" Binding="{Binding CST_CSTM}" Width="10*" />
                                    <sdk:DataGridTextColumn Header="英文船名" Binding="{Binding VSL_ENNAME}" Width="10*" />
                                    <sdk:DataGridTextColumn Header="中文船名" Binding="{Binding VSL_CNNAME}" Width="10*" />
                                    <sdk:DataGridTextColumn Header="靠泊序号" Binding="{Binding VBT_BERTHTIMES}" Width="10*" />
                                    <sdk:DataGridTextColumn Header="装\卸标志" Binding="{Binding VBT_LDUNLDFG}" Width="10*" />
                                    <sdk:DataGridTextColumn Header="靠泊状态" Binding="{Binding VBT_STATUS_MEANING}" Width="10*" />
                                    <sdk:DataGridTextColumn Header="抵港前吃水" Binding="{Binding VBT_PBTHDRAFT}" Width="10*" />
                                    <sdk:DataGridTextColumn Header="抵港平吃水" Binding="{Binding VBT_PBTHDRAFT_P}" Width="10*" />
                                    <sdk:DataGridTextColumn Header="抵港后吃水" Binding="{Binding VBT_PBTHDRAFT_A}" Width="10*" />
                                    <sdk:DataGridTextColumn Header="离港前吃水" Binding="{Binding VBT_PDPTDRAFT}" Width="10*" />
                                    <sdk:DataGridTextColumn Header="离港平吃水" Binding="{Binding VBT_PDPTDRAFT_P}" Width="10*" />
                                    <sdk:DataGridTextColumn Header="离港后吃水" Binding="{Binding VBT_PDPTDRAFT_A}" Width="10*"/>
                                    <!--<sdk:DataGridTextColumn Header="计划靠泊时间发布" Binding="{Binding VBT_PBTH_ISSUE}" Width="10*" IsReadOnly="True"/>
                                <sdk:DataGridTextColumn Header="计划离泊时间发布" Binding="{Binding VBT_PDPT_ISSUE}" Width="10*" IsReadOnly="True"/>
                                <sdk:DataGridTextColumn Header="引航站靠泊时间" Binding="{Binding VBT_PILOT_PBTHDT}" Width="10*" IsReadOnly="True"/>
                                <sdk:DataGridTextColumn Header="引航站离泊时间" Binding="{Binding VBT_PILOT_PDPTDT}" Width="10*" IsReadOnly="True"/>
                                <sdk:DataGridTextColumn Header="发布时间" Binding="{Binding VBT_BROADDT}" Width="10*" IsReadOnly="True"/>-->

                                </sdk:DataGrid.Columns>
                            </sdk:DataGrid>

                        </StackPanel>

                    </sdk:TabItem>
                    <sdk:TabItem Header="航次">
                        <StackPanel>
                            <Border BorderThickness="1" Height="30" BorderBrush="#b4b4b4" CornerRadius="1" >
                                <Border.Background>
                                    <ImageBrush ImageSource="/SLWebApp;component/img/operate_box_bg.png" />
                                </Border.Background>
                                <StackPanel  Orientation="Horizontal" HorizontalAlignment="Left" >
                                    <TextBlock Text="操作：" Padding="10,6" Height="30" Width="50"/>
                                    <Image Width="16" Height="16" Source="/SLWebApp;component/img/icon_add.png"></Image>
                                    <TextBlock x:Name="btnVoyage_ADD" MouseLeftButtonDown="btnVoyage_ADD_MouseLeftButtonDown" Padding="3,6" Cursor="Hand">增加</TextBlock>
                                    <TextBlock Padding="3,5">|</TextBlock>
                                    <Image Width="16" Height="16" Source="/SLWebApp;component/img/icon_delete.png"></Image>
                                    <TextBlock x:Name="btnVoyage_Dele" MouseLeftButtonDown="btnVoyage_Dele_MouseLeftButtonDown" Padding="3,6" Cursor="Hand">删除</TextBlock>
                                    <TextBlock Padding="3,5">|</TextBlock>
                                    <Image Width="16" Height="16" Source="/SLWebApp;component/img/Icon-Search.png"></Image>
                                    <TextBlock x:Name="btnVoyage_Modefy" MouseLeftButtonDown="btnVoyage_Modefy_MouseLeftButtonDown" Padding="3,6" Cursor="Hand">修改</TextBlock>
                                    <TextBlock Padding="3,5">|</TextBlock>
                                </StackPanel>
                            </Border>
                            <Border BorderThickness="0" Height="5">
                            </Border>
                            <!--航次表格内容-->
                            <sdk:DataGrid x:Name="dataGridVoyage" Height="Auto" MaxHeight="80"  AutoGenerateColumns="False" HorizontalContentAlignment="Center">
                                <sdk:DataGrid.Columns>
                                    <sdk:DataGridTextColumn Header="I/E" Binding="{Binding  VOY_IEFG}" Width="3*" IsReadOnly="True" />
                                    <sdk:DataGridTextColumn Header="英文船名" Binding="{Binding VSL_ENNAME}" Width="10*" IsReadOnly="True"/>
                                    <sdk:DataGridTextColumn Header="中文船名" Binding="{Binding VSL_CNNAME}" Width="10*" IsReadOnly="True"/>
                                    <sdk:DataGridTextColumn Header="航次" Binding="{Binding VOY_VOYAGE}" Width="5*" IsReadOnly="True"/>
                                    <sdk:DataGridTextColumn Header="服务航线" Binding="{Binding SLN_NAME}" Width="10*" IsReadOnly="True"/>
                                    <sdk:DataGridTextColumn Header="船公司" Binding="{Binding VCM_CSTMCD}" Width="10*" IsReadOnly="True"/>
                                    <sdk:DataGridTextColumn Header="船代理" Binding="{Binding CST_AGT_CSTM}" Width="10*" IsReadOnly="True"/>
                                    <sdk:DataGridTextColumn Header="散货(吨)" Binding="{Binding VOY_PTONNAGE}" Width="10*" IsReadOnly="True"/>
                                    <sdk:DataGridTextColumn Header="集装箱(TEU)" Binding="{Binding VOY_LTONNAGE}" Width="10*" IsReadOnly="True"/>
                                    <sdk:DataGridTemplateColumn Header="操作"  Width="8*" >
                                        <sdk:DataGridTemplateColumn.CellTemplate>
                                            <DataTemplate>
                                                <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
                                                    <Button Content="航次箱量" x:Name="btnVoyage_Amount_Container" Tag="{Binding VOY_ID}" Click="btnVoyage_Amount_Container_Click" />
                                                </StackPanel>
                                            </DataTemplate>
                                        </sdk:DataGridTemplateColumn.CellTemplate>
                                    </sdk:DataGridTemplateColumn>
                                </sdk:DataGrid.Columns>
                            </sdk:DataGrid>
                        </StackPanel>
                    </sdk:TabItem>
                </sdk:TabControl>
            </StackPanel>
        </Grid>
    </toolkit:BusyIndicator>
</UserControl>
